package com.macken.wow.entity;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class CharacterInfo {
	private int guid;
	private int account;
	private String name;
	private int race;
	private int cclass;
	private int level;
	private int gennder;
	private int xp;
	private int money;
	private int online;
	public int getGuid() {
		return guid;
	}
	public void setGuid(int guid) {
		this.guid = guid;
	}
	public int getAccount() {
		return account;
	}
	public void setAccount(int account) {
		this.account = account;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getRace() {
		return race;
	}
	public void setRace(int race) {
		this.race = race;
	}
	public int getCclass() {
		return cclass;
	}
	public void setCclass(int cclass) {
		this.cclass = cclass;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public int getGennder() {
		return gennder;
	}
	public void setGennder(int gennder) {
		this.gennder = gennder;
	}
	public int getXp() {
		return xp;
	}
	public void setXp(int xp) {
		this.xp = xp;
	}
	public int getMoney() {
		return money;
	}
	public void setMoney(int money) {
		this.money = money;
	}
	

	public int getOnline() {
		return online;
	}
	public void setOnline(int online) {
		this.online = online;
	}


	public static RowMapper<CharacterInfo> rowMapper = new RowMapper<CharacterInfo>() {

		public CharacterInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
			CharacterInfo ci = new CharacterInfo();
			ci.guid = rs.getInt("guid");
			ci.account = rs.getInt("account");
			ci.name = rs.getString("name");
			ci.race = rs.getInt("race");
			ci.cclass = rs.getInt("class");
			ci.gennder = rs.getInt("gender");
			ci.level = rs.getInt("level");
			ci.xp = rs.getInt("xp");
			ci.money = rs.getInt("money");
			ci.online=rs.getInt("online");
			return ci;
		}
	};

}
